using Infrastructure.TestsCore.Helpers;
using NUnit.Framework;

namespace Infrastructure.Data.Tests
{
    /// <summary>
    /// This class methods cleans all changes in database
    /// made during tests. 
    /// </summary>
    //[SetUpFixture]
    public class DatabaseTestsCleaner
    {
        /// <summary>
        /// This method is called before all tests in 
        /// Infrastructure.Data.Tests assembly will be made.
        /// </summary>
        [SetUp]
        public void SetUp()
        {
            new DatabaseHelper().DeleteAndCreateDatabase();
        }

        /// <summary>
        /// This method is called after all tests in 
        /// Infrastructure.Data.Tests assembly are done.
        /// </summary>
        [TearDown]
        public void TearDown()
        {
            new DatabaseHelper().DeleteAndCreateDatabase();
        }
    }
}